package com.lecture.junit.tdd.example;

import com.lecture.junit.tdd.example.exception.InvalidPasswordException;
import org.joda.time.DateTime;

public interface IAccount {

    String getUserName();

    Boolean passwordMatches(String pass);

    void setLoggedIn();

    boolean isLoggedIn();

    void setRevoked();

    boolean isRevoked();

    void setPasswordExpired();

    void resetPasswordExpided();

    boolean isPasswordExpired();

    DateTime getLastTimeLoggedIn();

    void updateLastTimeLoggedIn();

    DateTime getLastTimeLoggedOut();

    DateTime getLastTimeChangePassword();

    void updateLastTimeChangePassword();

    boolean changePassword(String oldPassword, String newPassword) throws InvalidPasswordException;

    boolean isOldPassword(String oldPassword);

}
